codon_dict = {
    'Methionine': ['AUG'],
	'Phenylalanine': ['UUU', 'UUC'],
	'Leucine': ['UUA', 'UUG'],
	'Serine': ['UCU', 'UCC', 'UCA', 'UCG'],
	'Tyrosine': ['UAU', 'UAC'],
	'Cysteine': ['UGU', 'UGC'],
	'Tryptophan': ['UGG'],
	'STOP': ['UAA', 'UAG', 'UGA']
}

def proteins(strand):
    i = 0
    pept = []
    while i < len(strand):
        codon = strand[i:i+3]
        for key, value in codon_dict.items():
            if codon in value:
                if key == 'STOP':
                    return pept
                pept.append(key)
        i += 3
    return pept

rna = 'AUGUAA'

rna[0:3]

proteins(rna)